<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <%@include file="style.jsp" %>
    <%@include file="script.jsp" %>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/orderlang/distributor/css/storage_detail.css"/>
    <title>我的订货郎</title>
</head>
<body onselectstart="return false">
<div id="container_1" style="height:100%">
    <div style="position: relative">
        <%@include file="header.jsp" %>
    </div>
    <div id="content" class="clearfix">
        <%@include file="left_menu.jsp" %>
        <!--内容部分-->
        <div class="right-content" style="margin:75px 50px 0 213px;">
            <p class="brand">
                <a>库存</a>><a class="now">出/入库详情</a>
            </p>
            <div class="content">
                <div class="top-block">
                    <div class="clearfix product">
                        <div class="img fl">
                            <img src="${pageContext.request.contextPath}/img/1.jpg" alt=""/>
                        </div>
                        <div class="detail fl">
                            <p>${product.name}<span>${product.label}</span></p>
                            <ul>
                                <li>规格：<span>${product.spec}</span></li>
                                <li>商品分类：<span>${product.category}</span></li>
                                <li>商品品牌：<span>${product.brand}</span></li>
                                <li>商品编号：<span>${product.code}</span></li>
                                <li>上下架：<span>${product.isOnShelve}</span></li>
                                <li>条形码：<span>${product.barCode}</span></li>
                                <li>起定量：<span>${product.MOQ}${product.unit}</span></li>
                            </ul>
                        </div>
                    </div>
                    <div class="warehouse-count clearfix">
                        <p>实际库存：<span>${product.actualInvertory}</span>${product.unit}</p>
                        <p>展示库存：<span>${product.safeInvertory}</span>${product.unit}</p>
						<c:forEach items="${producWarehouses}" var="iR">
                             <p class="warehouse">${iR.name}：<span>${iR.actualInvertory}</span>${product.unit}</p>
						</c:forEach>
                    </div>
                    <div class="clearfix condition">
                        <div class="select-box fl">
                            <span class="fl">仓库</span>
                            <div class="fl">
                                <input type="text" readonly class="show"/>
                                <span>▼</span>
                                <ul class="hide">
                                    <li>西南仓库</li>
                                    <li>华北仓库</li>
                                    <li>西北仓库</li>
                                    <li>华南仓库</li>
                                </ul>
                            </div>
                        </div>
                        <div class="date fl">
                            <span class="fl">出库时间</span>
                            <input class="fl" id="datePicker" readonly placeholder="请选择开始日期" onchange="changes()"/>
                        </div>
                        <div class="button">近一个月出/入库记录</div>
                    </div>
                    <ul class="clearfix">
                        <li class="active">全部类型</li>
                        <li>出库</li>
                        <li>入库</li>
                    </ul>
                </div>
                <div class="product-list">
                    <table>
                        <thead>
                        <tr>
                            <td>仓库</td>
                            <td>所在仓库库存</td>
                            <td>单位</td>
                            <td>类型</td>
                            <td>数量</td>
                            <td>出/入库时间</td>
                            <td>经办人</td>
                        </tr>
                        </thead>
                        <tbody>
						<c:forEach items="${products}" var="iR">
                        <tr>
                            <td>${iR.warehouse}</td>
                            <td>${iR.warehouseInvertory}</td>
                            <td>${iR.unit}</td>
                            <td>${iR.type}</td>
                            <td>${iR.quantity}</td>
                            <td><fmt:formatDate value="${iR.operateTime}" pattern="yyyy-MM-dd hh:mm"/></td>
                            <td>${iR.operateName}</td>
                        </tr>
						</c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <script src="${pageContext.request.contextPath}/static/orderlang/distributor/js/storage_detail.js"></script>
        <!--内容部分结束-->
    </div>
</div>

</body>
</html>